* Only call ParserOutput::setTOCHTML() if a TOC was really generated
foreach ( $tree as $section ) {
if ( $section['toclevel'] > $lastLevel )
$toc .= $this->tocIndent();
- else if ( $secton['toclevel'] < $lastLevel )
+ else if ( $section['toclevel'] < $lastLevel )
$toc .= $this->tocUnindent(
$lastLevel - $section['toclevel'] );
else
$toc .= $sk->tocUnindent( $prevtoclevel - 1 );
}
$toc = $sk->tocList( $toc );
+ $this->mOutput->setTOCHTML( $toc );
}
if ( $isMain ) {
$this->mOutput->setSections( $tocraw );
- $this->mOutput->setTOCHTML( $toc );
}
# split up and insert constructed headlines